﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using Teigha.Core;

namespace Teigha.TD
{
	public class OdDbBlockParamValueSet : OdRxObject
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdDbBlockParamValueSet(IntPtr cPtr, bool cMemoryOwn) : base(TD_DbPINVOKE.OdDbBlockParamValueSet_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdDbBlockParamValueSet obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdDbBlockParamValueSet()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							TD_DbPINVOKE.delete_OdDbBlockParamValueSet(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public new static OdDbBlockParamValueSet cast(OdRxObject pObj)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDbBlockParamValueSet_cast(OdRxObject.getCPtr(pObj));
			OdDbBlockParamValueSet result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbBlockParamValueSet)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbBlockParamValueSet)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbBlockParamValueSet)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdRxClass desc()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbBlockParamValueSet_desc(), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxClass isA()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbBlockParamValueSet_isA(this.swigCPtr), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxObject queryX(OdRxClass protocolClass)
		{
			OdRxObject result = Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbBlockParamValueSet_queryX(this.swigCPtr, OdRxClass.getCPtr(protocolClass)), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static OdDbBlockParamValueSet createObject()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDbBlockParamValueSet_createObject();
			OdDbBlockParamValueSet result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbBlockParamValueSet)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbBlockParamValueSet)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbBlockParamValueSet)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbBlockParamValueSet Assign(OdDbBlockParamValueSet arg0)
		{
			OdDbBlockParamValueSet result = (OdDbBlockParamValueSet)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbBlockParamValueSet_Assign(this.swigCPtr, OdDbBlockParamValueSet.getCPtr(arg0)), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void assign(OdDbBlockParamValueSet vs)
		{
			TD_DbPINVOKE.OdDbBlockParamValueSet_assign(this.swigCPtr, OdDbBlockParamValueSet.getCPtr(vs));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool angDir()
		{
			bool result = TD_DbPINVOKE.OdDbBlockParamValueSet_angDir(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool angular()
		{
			bool result = TD_DbPINVOKE.OdDbBlockParamValueSet_angular(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual double closestLegalValue(double value, double initial)
		{
			double result = TD_DbPINVOKE.OdDbBlockParamValueSet_closestLegalValue(this.swigCPtr, value, initial);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void dwgInFieldsHelper(OdDbDwgFiler arg0)
		{
			TD_DbPINVOKE.OdDbBlockParamValueSet_dwgInFieldsHelper(this.swigCPtr, OdDbDwgFiler.getCPtr(arg0));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void dwgOutFieldsHelper(OdDbDwgFiler arg0)
		{
			TD_DbPINVOKE.OdDbBlockParamValueSet_dwgOutFieldsHelper(this.swigCPtr, OdDbDwgFiler.getCPtr(arg0));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void dxfInFieldsHelper(OdDbDxfFiler arg0, short arg1, short arg2, short arg3, short arg4)
		{
			TD_DbPINVOKE.OdDbBlockParamValueSet_dxfInFieldsHelper(this.swigCPtr, OdDbDxfFiler.getCPtr(arg0), arg1, arg2, arg3, arg4);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual void dxfOutFieldsHelper(OdDbDxfFiler arg0, short arg1, short arg2, short arg3, short arg4)
		{
			TD_DbPINVOKE.OdDbBlockParamValueSet_dxfOutFieldsHelper(this.swigCPtr, OdDbDxfFiler.getCPtr(arg0), arg1, arg2, arg3, arg4);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double increment()
		{
			double result = TD_DbPINVOKE.OdDbBlockParamValueSet_increment(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double maximum()
		{
			double result = TD_DbPINVOKE.OdDbBlockParamValueSet_maximum(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double minimum()
		{
			double result = TD_DbPINVOKE.OdDbBlockParamValueSet_minimum(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setAngDir(bool arg0)
		{
			TD_DbPINVOKE.OdDbBlockParamValueSet_setAngDir(this.swigCPtr, arg0);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setAngular(bool arg0)
		{
			TD_DbPINVOKE.OdDbBlockParamValueSet_setAngular(this.swigCPtr, arg0);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setIncrement(double arg0)
		{
			TD_DbPINVOKE.OdDbBlockParamValueSet_setIncrement__SWIG_0(this.swigCPtr, arg0);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setIncrement(double arg0, bool arg1)
		{
			TD_DbPINVOKE.OdDbBlockParamValueSet_setIncrement__SWIG_1(this.swigCPtr, arg0, arg1);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setMaximum(double arg0)
		{
			TD_DbPINVOKE.OdDbBlockParamValueSet_setMaximum__SWIG_0(this.swigCPtr, arg0);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setMaximum(double arg0, bool arg1)
		{
			TD_DbPINVOKE.OdDbBlockParamValueSet_setMaximum__SWIG_1(this.swigCPtr, arg0, arg1);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setMinimum(double arg0)
		{
			TD_DbPINVOKE.OdDbBlockParamValueSet_setMinimum__SWIG_0(this.swigCPtr, arg0);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setMinimum(double arg0, bool arg1)
		{
			TD_DbPINVOKE.OdDbBlockParamValueSet_setMinimum__SWIG_1(this.swigCPtr, arg0, arg1);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setUseIncrement(bool arg0)
		{
			TD_DbPINVOKE.OdDbBlockParamValueSet_setUseIncrement(this.swigCPtr, arg0);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setUseMaximum(bool arg0)
		{
			TD_DbPINVOKE.OdDbBlockParamValueSet_setUseMaximum(this.swigCPtr, arg0);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setUseMinimum(bool arg0)
		{
			TD_DbPINVOKE.OdDbBlockParamValueSet_setUseMinimum(this.swigCPtr, arg0);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setUseValueList(bool arg0)
		{
			TD_DbPINVOKE.OdDbBlockParamValueSet_setUseValueList(this.swigCPtr, arg0);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setValueList(OdGeDoubleArray arg0)
		{
			TD_DbPINVOKE.OdDbBlockParamValueSet_setValueList__SWIG_0(this.swigCPtr, OdGeDoubleArray.getCPtr(arg0));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setValueList(OdGeDoubleArray arg0, bool arg1)
		{
			TD_DbPINVOKE.OdDbBlockParamValueSet_setValueList__SWIG_1(this.swigCPtr, OdGeDoubleArray.getCPtr(arg0), arg1);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeDoubleArray sortedValueListIncluding(double arg0)
		{
			OdGeDoubleArray result = new OdGeDoubleArray(TD_DbPINVOKE.OdDbBlockParamValueSet_sortedValueListIncluding(this.swigCPtr, arg0), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void updateValue(double arg0)
		{
			TD_DbPINVOKE.OdDbBlockParamValueSet_updateValue(this.swigCPtr, arg0);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool useIncrement()
		{
			bool result = TD_DbPINVOKE.OdDbBlockParamValueSet_useIncrement(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool useMaximum()
		{
			bool result = TD_DbPINVOKE.OdDbBlockParamValueSet_useMaximum(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool useMinimum()
		{
			bool result = TD_DbPINVOKE.OdDbBlockParamValueSet_useMinimum(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool useValueList()
		{
			bool result = TD_DbPINVOKE.OdDbBlockParamValueSet_useValueList(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual bool valueIsLegal(double arg0, double arg1)
		{
			bool result = TD_DbPINVOKE.OdDbBlockParamValueSet_valueIsLegal(this.swigCPtr, arg0, arg1);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeDoubleArray valueList()
		{
			OdGeDoubleArray result = new OdGeDoubleArray(TD_DbPINVOKE.OdDbBlockParamValueSet_valueList(this.swigCPtr), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
